/*************************************************************************
 *
 *   file		: Stun.cs
 *   copyright		: (C) The WCell Team
 *   email		: info@wcell.org
 *   last changed	: $LastChangedDate: 2009-06-03 00:48:39 +0100 (Wed, 03 Jun 2009) $
 *   last author	: $LastChangedBy: fubecao $
 *   revision		: $Rev: 945 $
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *************************************************************************/

using WCell.Constants.Spells;

namespace WCell.RealmServer.Spells.Auras.Handlers
{
	public class StunHandler : AuraEffectHandler
	{
		SpellMechanic mechanic;

		protected internal override void Apply()
		{
			mechanic = SpellEffect.Spell.Mechanic;
			mechanic = (mechanic == SpellMechanic.None) ? SpellMechanic.Stunned : mechanic;
			m_aura.Auras.Owner.IncMechanicCount(mechanic);
		}

		protected internal override void Remove(bool cancelled)
		{
			m_aura.Auras.Owner.DecMechanicCount(mechanic);
		}

		public override bool IsPositive
		{
			get
			{
				return false;
			}
		}
	}
};
